//
//  AppDelegate.m
//  aTest
//
//  Created by 黄杰 on 15/10/26.
//  Copyright © 2015年 黄杰. All rights reserved.
//

#import "AppDelegate.h"
#import "TestViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    application.statusBarStyle = UIStatusBarStyleLightContent;
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    
    self.window.backgroundColor = [UIColor whiteColor];
    
    PTSTabBarViewController *tabBar = [[PTSTabBarViewController alloc] init];
    tabBar.openItemClick = NO;
    __weak typeof(tabBar) weakTabBar = tabBar;
    tabBar.clickCompleted = ^ (NSInteger tag) {
        weakTabBar.selectedIndex = tag;
    };
    [tabBar setupTabBarBackgroundColor:[UIColor whiteColor]];
    [tabBar setupSelectedItemColor:[UIColor whiteColor]];
    [tabBar setupLineColor:[UIColor colorFormHexRGB:@"16A33A"]];
    [tabBar setupTitleColor:[UIColor colorFormHexRGB:@"BDBDBD"] selectedColor:[UIColor colorFormHexRGB:@"16A33A"]];
    NSArray *titleArray = @[@"首页", @"网络", @"分享", @"首页", @"首页"];
    NSArray *vcArray = @[[[TestViewController alloc] init], [[TestViewController alloc] init], [[TestViewController alloc] init], [[TestViewController alloc] init], [[TestViewController alloc] init]];
    NSArray *norArray = @[@"cart_01", @"class_01", @"home_01", @"member_01", @"shop_01"];
    NSArray *selArray = @[@"cart_02", @"class_02", @"home_02", @"member_02", @"shop_02"];
    [tabBar setupSubViesWithTitleArray:[titleArray mutableCopy] VcNameArray:[vcArray mutableCopy] NormalImgArray:[norArray mutableCopy] SelectedImgArray:[selArray mutableCopy]];
    
    self.window.rootViewController = tabBar;
    [self.window makeKeyAndVisible];
    
    return YES;
}

@end
